/**
 * 审核
 */
const Index = {
	getStatus(data, value){
		const d = data.filter(v => value === v.value)
		if( d.length === 1 ){
			return <span className={ d[0].c || '' }>{ d[0].label }</span>
		}
	},
	getAuditStatus(value){
		let txt = '--'
		let c = ''
		if( value === 1 ) {
			txt = '待审核'
			c = 'c1'
		}else if( value === 2 ) {
			txt = '已拒绝'
			c = 'g9'
		}else if( value >= 3 ){
			txt = '已通过'
			c = 'c4'
		}
		return <span className={c}>{ txt }</span>
	},
	status(d){ return { width:80, align:'center', render: t => this.getStatus( d, t ) } },
	auditStatus(){ return { width:80, align:'center', render: t => this.getAuditStatus( t ) } }
}
export default Index